package com.spzx.channel.controller;

import com.spzx.channel.service.ProductService;
import com.spzx.common.core.domain.R;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import com.spzx.common.core.web.page.TableDataInfo;
import com.spzx.product.api.domain.ProductSku;
import com.spzx.product.api.domain.SkuQuery;
import com.spzx.product.api.service.RemoteProductService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "H5项目商品分类")
@RestController
@RequestMapping("/list")
public class ProductController extends BaseController {

    @Autowired
    private ProductService productService;

    @Operation(summary = "获取商品列表")
    @GetMapping("/skuList/{pageNo}/{pageSize}")
    public TableDataInfo getProductSkuList(@PathVariable("pageNo") Integer pageNo, @PathVariable("pageSize") Integer pageSize, SkuQuery skuQuery){
        TableDataInfo productSkuLis= productService.getProductSkuList(pageNo,pageSize, skuQuery);
       return productSkuLis;
    }

}
